<template>
  <el-form
    :model="model"
    inline
    class="search-form"
  >
    <slot />
  </el-form>
</template>

<script>
export default {
  name: 'SearchForm',
  props: {
    model: {
      type: Object,
      required: true
    }
  },
  methods: {
    // 搜索
    handleSearch() {
      this.$emit('search')
    },
    // 重置
    handleReset() {
      this.$emit('reset')
    }
  }
}
</script>

<style scoped>
.search-form {
  background-color: #fff;
  padding: 15px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}
</style>
